<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 定义变量赋
        var shu=prompt('请输入一个数')
        var sh1=prompt('请输入第二个数')
        // 判断两个是否一样
        if(shu%2!=0 &&sh1%2!=0){
            alert('这两个数的奇偶都相同')

        }else if(shu%2==0&&sh1%2==0){
            alert('这两个数的奇偶都相同')
        }else{
            alert('不相同')
        }
    </script>
    
</body>
</html>